import request from '@/config/axios'

// 仓库区域库位 VO
export interface WarehouseLocationVO {
  id: number // id
  name: string // 库位名称
  warehouseId: number // 仓库id
  areaId: number // 仓库区域id
  status: number // 状态
  remark: string // 备注
}

// 仓库区域库位 API
export const WarehouseLocationApi = {
  // 查询仓库区域库位分页
  getWarehouseLocationPage: async (params: any) => {
    return await request.get({ url: `/erp/warehouse-location/page`, params })
  },

  // 查询仓库区域库位详情
  getWarehouseLocation: async (id: number) => {
    return await request.get({ url: `/erp/warehouse-location/get?id=` + id })
  },

  // 新增仓库区域库位
  createWarehouseLocation: async (data: WarehouseLocationVO) => {
    return await request.post({ url: `/erp/warehouse-location/create`, data })
  },
 // 仓库区域库位列表
 pageList: async (params: any) => {
  return await request.get({ url: `/erp/warehouse-location/page`, params })
},
   // 仓库区域删除
   delete: async (data: any) => {
  return await request.delete({ url: `/erp/warehouse-location/delete?id=`+data })
},
 // 仓库区域编辑
 update: async (data: any) => {
  return await request.put({ url: `/erp/warehouse-location/update`,data })
},
 // 仓库区域详情
 details: async (data: any) => {
  return await request.get({ url: `/erp/warehouse-location/get?id=`+data })
},
}
